package com.xbongbong.pro.smartsettings.pojo.dto;

import com.xbongbong.paas.domain.entity.ext.OptionalRangeEntity;
import com.xbongbong.pro.smartsettings.pojo.SmartStrategyPojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * @description: 保存设置
 * @Author: hongxiao
 * @date: 2019-04-23 21:09
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class SmartSettingsUpdateBatchDTO implements Serializable {
    private static final long serialVersionUID = 2606082942127580247L;
    @NotEmpty(message = "{dto.msg.smartSettingsUpdateBatch.xbbCode.NotEmpty}")
    private String xbbCode;
    /**
     * 公司id
     */
    @NotBlank(message="{dto.msg.smartSettingsUpdateBatch.corpid.NotBlank}")
    private String corpid;
    /**
     * 智能助手id
     */
    @Size(min = 1, message = "{dto.msg.smartSettingsUpdateBatch.ids.Size}")
    private List<Long> ids;
    /**
     * 是否启用
     */
    Integer enable;
    /**
     * 执行动作,1消息，2短信，3新增访客，4新增任务
     * @see com.xbongbong.pro.enums.smartsettings.enums.SmartActionTypeEnum
     */
    @Range(min = 1, max = 4, message = "{dto.msg.smartSettingsUpdateBatch.action.Range}")
    private Integer action;
    /**
     * 执行策略
     */
    private SmartStrategyPojo strategy;
    /**
     * 执行人
     */
    private List<OptionalRangeEntity> executor;
}
